From: Ivan Molodetskikh Date: Mon, 11 Oct 2021 07:17:08 +0000 (+0300) Subject: screenshot-ui: Make screenshots appear in recent items X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~207 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4442ced76032e09cea2fa14c7dfa6e056fa8e3d0;p=gnome-shell.git screenshot-ui: Make screenshots appear in recent items Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 41a4dfe16..c6b4c1387 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -1,7 +1,7 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- /* exported ScreenshotService, ScreenshotUI, showScreenshotUI */ -const { Clutter, Gio, GObject, GLib, Meta, Shell, St } = imports.gi; +const { Clutter, Gio, GObject, GLib, Gtk, Meta, Shell, St } = imports.gi; const GrabHelper = imports.ui.grabHelper; const Layout = imports.ui.layout; @@ -1586,6 +1586,9 @@ class ScreenshotUI extends St.Widget { } } + // Add it to recent files. + Gtk.RecentManager.get_default().add_item(file.get_uri()); + // Show a notification. const source = new MessageTray.Source( // Translators: notification source name.